from model import db
from sqlalchemy import Column,Integer,String,Text,ForeignKey,SmallInteger,DateTime
from datetime import datetime

# 创建用户
class UserModel(db.Model):
    __tablename__ = "user"

    id = Column(Integer,autoincrement=True,primary_key=True)
    nickname = Column(String(32),unique=True)
    phone = Column(String(11),default="")
    state = Column(SmallInteger,default=1)
    addtime = Column(DateTime,default=datetime.now())